#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include <ctype.h>
#include <stdbool.h>

struct deq {
	int data;
	struct deq *prev, *next;
};

int
main(int argc, char **argv)
{
	char in[4096];
	int max_size;
	struct deq *head;

	scanf("%d", max_size);
	head = malloc(sizeof *head);

	while (scanf("%s", in) == 1) {
		;
	}
}
